package com.walterweimod.auxiliary_attributes.capability.impl.base;

import com.walterweimod.auxiliary_attributes.capability.IChargeValue;

public abstract class ChargeValueBase<T> implements IChargeValue<T> {
    private T value;

    @Override
    public T getValue() {
        return value;
    }

    @Override
    public void setValue(T value) {
        this.value = value;
    }

    @Override
    public T getAndSetValue(T value) {
        T temp_value = this.value;
        setValue(value);
        return temp_value;
    }

    @Override
    public T getAndResetValue() {
        T temp_value = value;
        resetValue();
        return temp_value;
    }
}
